package ${entity.namespace}.${prefixPackage};

import ${entity.namespace}.service.${entity.nameCapital}ListQuery;
import ${entity.namespace}.service.${entity.nameCapital}Service;
import java.util.List;
import com.opensymphony.xwork.ActionSupport;
import com.opensymphony.xwork.ModelDriven;
import com.opensymphony.xwork.Preparable;

public class ${entity.nameCapital}ListAction extends ActionSupport implements ModelDriven, Preparable {

	private static final long serialVersionUID = ${statics["com.fzy.core.codetools.Utils"].getRandomLong()};

	List list;
	${entity.nameCapital}ListQuery ${entity.nameUncapital}ListQuery;
    ${entity.nameCapital}Service ${entity.nameUncapital}Service;

	public String execute() throws Exception {
		list = ${entity.nameUncapital}Service.list(${entity.nameUncapital}ListQuery);
		return "dispatcher:/WEB-INF/jsp/ge/${entity.moduleName}/${entity.nameUncapital}-list.jsp";
    }

	public void prepare() throws Exception {
		${entity.nameUncapital}ListQuery = new ${entity.nameCapital}ListQuery();
	}

	public void set${entity.nameCapital}Service(${entity.nameCapital}Service ${entity.nameUncapital}Service) {
		this.${entity.nameUncapital}Service = ${entity.nameUncapital}Service;
	}

	public Object getModel() {
		return ${entity.nameUncapital}ListQuery;
	}

	public List getList() {
		return list;
	}

	public ${entity.nameCapital}ListQuery get${entity.nameCapital}ListQuery() {
		return ${entity.nameUncapital}ListQuery;
	}
	
}
